﻿using Data.MongoDb.Entity;
using MongoDB.Bson;
using MongoDB.Driver;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Data.MongoDb
{
    public interface IRepositoryWithTypedId<T, TId> where T : Entity.EntityWithTypeId<TId>
    {
        T Get(TId id);
        IEnumerable<T> Find(QueryDocument args);
        IQueryable<T> AsQueryable();
        void Insert(T entity);
        void InsertMany(IEnumerable<T> entities);
        void Update(FilterDefinition<T> fiter, UpdateDefinition<T> update);
        void Update(T args);
        void Delete(QueryDocument args);
        void DeleteById(TId id);
    }
    public interface IMongoRepository<T> : MongoDb.IRepositoryWithTypedId<T, ObjectId> where T : MongoDb.Entity.Entity
    {

    }
}
